#pragma once
#include "vn/AutoPtr.h"
#include "vn/CommonExceptions.h"

void AutoPtrTest() {_test_func_;
	{
		// change because gcc problem
		// AutoPtr<Exception> x = new ArgumentException("test");
		AutoPtr<Exception> x(new ArgumentException("test"));
		x->ToString();
	}

	{
		AutoPtr<Exception> x(new ArgumentException("test"));
		Exception *pex = x.Get();
		assert(x.Get() == pex);
	}

	{
		AutoPtr<Exception> x(new ArgumentException("test"));
		Exception *pex = x.Release();
		assert(x.Get() == 0);
		delete pex;
	}
	
}

